 Function Grapher 



Graphs any function you enter on the scale of your choice, assuming you use the correct JavaScript syntax. For example, to use Cos x, use Math.cos(x). Or, for x^2, use Math.pow(x, 2), etc. 
--------------------------------------------------------------------------------
 

<!-- THREE STEPS TO INSTALL FUNCTION GRAPHER:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document
  3.  Paste the final coding into a new file, drawGraph.html  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Stephane Gamondes (gamondes@hotmail.com) -->
<!-- Web Site:  http://www.multimania.com/gamondes -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function drawGraph(frm) {
gURL = "drawGraph.html?graph=" + escape(frm.graph.value) + "&minX=" + frm.minX.value + "&maxX=" + frm.maxX.value;
open(gURL, 'graphWdw', 'width=250,height=250');
}
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
<form>
<table border=0 bgcolor="#E6E6E6" cellpadding=3 cellspacing=0>
<tr>
<td colspan=2>
<font face="Arial" size="2">Function (JavaScript syntax)<br>
<input type=text name=graph size=20 maxlength=40 value="Math.cos(x)">
<p>
<td rowspan=2 valign=middle align=center> 
<input type=button value="Plot" name=Plot onClick="drawGraph(this.form)">   
</td>
</tr>
<tr>
<td nowrap>
<font face="Arial" size="2">X min<br>
<input type=text name=minX size=4 maxlength=3 value="-10">
</font>
</td>
<td nowrap>
<font face="Arial" size="2">X max<br>
<input type=text name=maxX size=3 maxlength=3 value="10">
</font>
</td>
</tr>
</table>
</form>
</center>
<!-- Script Size:  4.67 KB -->